digraph all_service {
	edge [fontname="Microsoft YaHei"];
    node [shape=box,fontname="Microsoft YaHei",style=filled]

   node [color="Lavender"]
   label="${env.name}"
   		<#list env.hosts as host>
   		subgraph cluster_host_${host.name}{
   			<#if host.publicAccess>
   				<#assign hostFontColor="red">
   			<#else>
   				<#assign hostFontColor="black">
   			</#if>

    		<#if host.vm>
    			<#assign vm="(vm)">
    		<#else>
    			<#assign vm="">
    		</#if> 
           label = "${host.title}${vm}"
           fontcolor=${hostFontColor}
           fontsize="10"
           style=filled
           
           <#list host.hostService as depService>
           		<#if depService.service.name == serviceName>
     			    <#if depService.service.publicAccess>
			    		<#assign peripheries="2">
			    	<#else>
			    		<#assign peripheries="1">
			    	</#if>
			    	<#if depService.service.introduced>
			    		<#assign fontcolor="purple">
			    	<#else>
			    		<#assign fontcolor="black">
			    	</#if>
                       <#if depService.database>
                         		<#assign shape="house">
                                 <#assign fillColor="GoldEnrod">
                         	<#else>
                         		<#assign shape="ellipse">
                                 <#assign fillColor="Moccasin">
                         	</#if>
			    	${depService.deployName}[label = "${depService.showName}",color="${fillColor}",peripheries="${peripheries}",fontcolor="${fontcolor}",shape="${shape}" ]
		    	</#if>
           </#list>
          
     	}		
   		</#list>

}